using System.Configuration;

namespace CriticalSystems.Instrumentation.Configuration
{
    /// <summary>
    /// Configuration element for defining the log or trace writing mechanism
    /// </summary>
    public class WriterElement : ConfigurationElement
    {
        /// <summary>
        /// Gets or sets the type of the writer factory.
        /// </summary>
        [ConfigurationProperty("factory")]
        public string Factory
        {
            get { return (string) this["factory"]; }

            set { this["factory"] = value; }
        }

        /// <summary>
        /// Gets or sets the trace writer settings.
        /// </summary>
        [ConfigurationProperty("settings", IsRequired = false)]
        public ArbitraryElement Settings
        {
            get { return (ArbitraryElement) this["settings"]; }

            set { this["settings"] = value; }
        }
    }
}